1. Field of the Invention
The present invention relates generally to a control unit and method for controlling a motor for use in a printer, and a storage medium storing a control program. More specifically, the invention is used for controlling the speed of a motor for driving a carriage of a serial printer.
2. Description of Related Art
In a typical serial printer such as an ink jet printer, a recording head scans on a printing paper to print. This recording head is fixed to a carriage to move with the carriage. This carriage is driven by a DC (Direct Current) motor. The system for driving the carriage is as follows.
First, a CR motor starts by acceleration control. The CR motor is driven at a constant speed by PID control. Then, the CR motor decelerates to stop.
A printing operation is executed while a carriage is transferring at a constant speed, or the CR motor is driven at the constant speed.
PID control is performed based on a deviation of a counted value of the output pulses of an encoder rotating in accordance with the rotation of the CR motor from a target position (target number of pulses).
The carriage will stop, however, at a position apart from the target position due to change in carriage inertia (moment of inertia), loads, motor currents, and so on. A special control (logical seek) is required to stop the carriage at the target position. Such a control is very complex and takes long.